<!--我的票据页面-->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments/layout::head">
</head>
<body class="hold-transition sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper" >
    <!-- Navbar 顶部水平导航栏-->
    <nav th:replace="fragments/layout::topNav"></nav>
    <!-- /.navbar -->

    <!-- Main Sidebar Container  侧边导航栏-->
    <aside th:replace="fragments/layout::commonAside"></aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper" id="app">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>我的票据</h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="/common/home">Home</a></li>
                            <li class="breadcrumb-item active">我的票据</li>
                        </ol>
                    </div>
                </div>
            </div><!-- /.container-fluid -->
        </section>

        <!-- Main content -->
        <section class="content">

            <!-- Default box -->
            <div class="card">
                <div class="card-header">
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <button class="input-group-text" @click="searchticket"><i class="fa fa-search">查询</i></button>
                        </div>
                        <input type="text" @keyup.enter="searchticket" v-model="searchcompanyName" class="form-control" placeholder="公司名">
                        <input type="number" @keyup.enter="searchticket" v-model="searchmoney" class="form-control" placeholder="金额">
                        <input type="text" @keyup.enter="searchticket" v-model="searchsubject" class="form-control" placeholder="主题">
                        <input type="text" @keyup.enter="searchticket" v-model="searchtype" class="form-control" placeholder="类型">
                    </div>
                    <div class="dropdown">
                        <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
                            筛选
                        </button>
                        <div class="dropdown-menu">
                            <a class="dropdown-item" onclick="weitijiao()">未提交</a>
                            <a class="dropdown-item" onclick="weishenhe()">未审核</a>
                            <a class="dropdown-item" onclick="shenhe()">已审核</a>
                            <a class="dropdown-item" onclick="tuihui()">退回</a>
                        </div>
                    </div>

<!--                    <div class="card-tools">-->
<!--                        <button type="button" class="btn btn-tool" data-card-widget="collapse" data-toggle="tooltip" title="Collapse">-->
<!--                            <i class="fas fa-minus"></i></button>-->
<!--                        <button type="button" class="btn btn-tool" data-card-widget="remove" data-toggle="tooltip" title="Remove">-->
<!--                            <i class="fas fa-times"></i></button>-->
<!--                    </div>-->
                </div>
                <div class="card-body" >
                    <table id="table" class="table-striped table-bordered">
                    </table>

                    <!-- 模态框 -->
                    <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog"  id="editTicket" >
                        <div class="modal-dialog modal-lg">
                            <div class="modal-content">
                                <!-- 模态框头部 -->
                                <div class="modal-header">
                                    <h4 class="modal-title">编辑票据</h4>
                                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                                </div>

                                <!-- 模态框主体 -->
                                <div class="modal-body">
                                    <table class="table table-active">
                                        <td><h3>票据ID:{{ticket.id}}</h3></td>
                                        <tr></tr>
                                        <td>公司名:<input type="text" v-model="ticket.companyName" class="form-control">
                                        金额:<input type="number" v-model="ticket.money" class="form-control"></td>
                                        <tr></tr>
                                        <td>主题:<input type="text" v-model="ticket.subject" class="form-control">
                                        类型:<input type="text" v-model="ticket.type" class="form-control"></td>
                                        <tr></tr>
                                        <td>内容:
                                            <textarea class="form-control" id="body" v-model="ticket.body" rows="5">

                                            </textarea>
                                            </textarea>
                                        </td>
                                        <tr></tr>
                                        <td>
                                            <form id="form">
                                            <div class="form-group">
                                                <label>添加附件</label>
                                                <input type='file' class="btn btn-outline-primary"
                                                       style='margin:5px;' name='files'  required='required'>
<!--                                                <input type='button' value='删除' onclick='remove(this)'>-->

                                                <input id="submit" type="button" value="上传" class="btn btn-warning"
                                                       @click="ajaxUpload"/>


                                            </div>
                                        </form>
                                        </td>
                                        <tr></tr>
                                        <td>提交时间:{{ticket.submitdate}}</td>
                                    </table>
                                </div>

                                <!-- 模态框底部 -->
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-secondary" @click="tosave" >暂时保存</button>
                                    <button type="button" class="btn btn-secondary" @click="tosubmit" data-dismiss="modal" >修改并提交</button>
                                </div>

                            </div>
                        </div>
                    </div>

                    <!-- 模态框 -->
                    <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog"  id="myModal">
                        <div class="modal-dialog modal-lg">
                            <div class="modal-content">
                                <!-- 模态框头部 -->
                                <div class="modal-header">
                                    <h4 class="modal-title">票据详情</h4>
                                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                                </div>

                                <!-- 模态框主体 -->
                                <div class="modal-body">
                                    <table class="table table-active">
                                        <td>票据ID:{{ticket.id}}</td>
                                        <tr></tr>
                                        <td>公司名:{{ticket.companyName}}</td>
                                        <tr></tr>
                                        <td>金额:{{ticket.money}}</td>
                                        <tr></tr>
                                        <td>主题:{{ticket.subject}}</td>
                                        <tr></tr>
                                        <td>内容:{{ticket.body}}</td>
                                        <tr></tr>
                                        <td>类型:{{ticket.type}}</td>
                                        <tr></tr>
                                        <td>提交时间:{{ticket.submitdate}}</td>
                                        <tr></tr>
                                        <td>备注信息:{{ticket.remark}}</td>
                                    </table>
                                </div>

                                <!-- 模态框底部 -->
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                                </div>

                            </div>
                        </div>
                    </div>

                </div>
                <!-- /.card-body -->
                <div class="card-footer">
                    408 TicketManageSystem
                </div>
                <!-- /.card-footer-->
            </div>
            <!-- /.card -->

        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->


<!--    <div style="" id="rocket-to-top">-->
<!--        <div style="opacity: 0; display: block;" class="level-2"></div>-->
<!--        <div class="level-3"></div>-->
<!--    </div>-->

    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Control sidebar content goes here -->
    </aside>
    <!-- /.control-sidebar -->


    <footer th:replace="fragments/layout::footer"></footer>



</div>
<!-- ./wrapper -->


<script th:src="@{/site/js/myList.js}"></script>

</body>


</html>
